<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // generator的函数
        function *demo() {
            yield 111;
            yield 112;
            yield 113;
            yield 114;
            return 115;
        }
        // 调用
        let res = demo();
        // console.log(res);
        console.log(res.next());
        console.log(res.next());
        console.log(res.next());
        console.log(res.next());
        cobsole.log(res.next());
    </script>
    <script>
        async function xxoo() {
            let a = await 111;
            let b = await 112;
            let c = await 113;
            let d = await 114;
            let e = await 115;
            return {a, b, c, d, e}
        }
        
    </script>
</body>
</html>